import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:zhibao_flutter/widget/appbar/commom_bar.dart';
import 'package:zhibao_flutter/widget/base/my_scaffold.dart';
import 'package:zhibao_flutter/zone.dart';

import 'privacy_logic.dart';

class PrivacyPage extends StatelessWidget {
  final logic = Get.find<PrivacyLogic>();

  String get privacyContent {
    if (AppConfig.locale.languageCode == 'zh') {
      return privacyChinese;
    } else {
      return privacyEnglish;
    }
  }

  @override
  Widget build(BuildContext context) {
    return MyScaffold(
      appBar: kIsWeb ? null : CommomBar(title: 'privacyPolicy'.tr),
      body: ListView(
        padding: EdgeInsets.all(10.px),
        children: [Text(privacyContent)],
      ),
    );
  }
}

String privacyEnglish =
    ''''User Agreement and Privacy Policy\n\n1. Scope of Agreement\nThis agreement applies to your use of our application and related services. Please read this agreement carefully to ensure that you fully understand and agree to its terms.\n\n2. User Registration and Account\nUsers need to complete the registration process according to our provided registration process, ensuring that the information provided is true, accurate, and complete. Each user can only have one account.\n\n3. Service Use Rules\nUsers must comply with relevant laws and regulations and the provisions of this agreement when using our services.\n\n4. Content Guidelines and Copyright\nThe content published by users must comply with laws and regulations and must not infringe on the copyright, reputation rights, and other legal rights of others. We do not assume copyright responsibility for the content published by users.\n\n5. Intellectual Property Statement\nAll content in our application and services, including but not limited to text, pictures, audio, video, etc., is protected by copyright, trademark, patent, and other intellectual property laws.\n\n6. User Behavior Norms\nUsers should use our services in a civilized manner and must not engage in any behavior that violates laws and regulations, infringes on the rights of others, or interferes with the normal operation of the service.\n\n7. User Rights and Obligations\nUsers have the right to use our services, and at the same time, they have the obligation to comply with this agreement, protect account security, and maintain service order.\n\n8. Service Interruption and Termination\nWhen necessary, we have the right to interrupt or terminate the service without any liability to the user.\n\n9. Disclaimer and Compensation\nWe do not assume any responsibility for service interruptions or data loss caused by force majeure, third-party behavior, and other reasons. Users who cause losses to us or third parties due to violations of this agreement should bear the corresponding compensation responsibility.\n\n10. Applicable Law and Dispute Resolution\nThe signing, execution, and interpretation of this agreement are all applicable to the laws of the People\'s Republic of China. In case of disputes, they should be resolved through friendly negotiation first; if the negotiation fails, either party has the right to bring a lawsuit to the people\'s court with jurisdiction.\n\n11. Privacy Policy Overview\nWe attach great importance to user privacy and have formulated a special privacy policy. Users should also comply with the relevant provisions of the privacy policy when using our services.\n\n12. Information Collection and Use\nWe will collect information generated by users during the use of the service, which is used to optimize the service and improve the user experience. We will strictly comply with relevant laws and regulations and the provisions of the privacy policy, and reasonably use user information.\n\n13. Information Sharing and Disclosure\nExcept for the circumstances stipulated by laws and regulations, we will not share or disclose user information to third parties without reason.\n\n14. Information Security and Protection\nWe have taken a series of security measures to ensure the security of user information. But users should also pay attention to protecting their account and password security to avoid information leakage.\n\n15. Privacy Policy Update and Modification\nWith the development of the business and changes in laws and regulations, we may update or modify the privacy policy as appropriate. The updated or modified privacy policy will be announced in the application and notified to users when necessary.\n\nPlease be sure to read and fully understand the content of this agreement and privacy policy to ensure that your rights are fully protected. If you have any questions or suggestions, please contact us through our contact information. We will serve you wholeheartedly.\n\n\n**Application Privacy Policy**\n\nThank you for choosing to use our application. We attach great importance to your personal privacy, so we have formulated this privacy agreement to clarify how we collect, use, store, share, and protect your personal information. Please read and understand this privacy agreement carefully before using our application.\n\n**1. Introduction and Definition**\n\nThis privacy agreement is intended to explain how we handle user personal information. In this agreement, "personal information" refers to information that can directly or indirectly identify you, including but not limited to your name, phone number, email address, etc.\n\n**2. Information Collection and Use**\n\nWhen using our application, we may collect your personal information to provide you with better service. We will only collect your personal information with your explicit consent and only for the purpose of providing and improving our services.\n\n**3. Information Sharing and Disclosure**\n\nWe will not share or disclose your personal information to third parties without reason. But in some cases, such as legal requirements or to maintain our legal rights, we may need to share or disclose your personal information.\n\n**4. Information Security Guarantee**\n\nWe attach great importance to your information security and have taken a series of security measures to protect your personal information. However, due to the insecurity of the Internet, we cannot guarantee the absolute security of your personal information. Please take care of your password and other login information.\n\n**5. User Rights and Choices**\n\nYou have the right to ask us to delete your personal information, or to correct or supplement your personal information within a reasonable range. At the same time, you also have the right to choose whether to accept our promotional information.\n\n**6. Child Privacy Protection**\n\nOur application is not designed for children. If you are a child, please use our application with your parents and let your parents read this privacy agreement carefully.\n\n**7. Third-Party Links and Services**\n\nOur application may contain links to third-party websites or services. These third-party websites or services have their own privacy policies, and we are not responsible for them. Please read the relevant privacy policy carefully before use.\n\n**8. Privacy Policy Update and Notification**\n\nWe may update this privacy agreement as needed. The updated privacy agreement will be announced in the application and notified to you when necessary.\n\n**9. Contact Us and Feedback**\n\nIf you have any questions or suggestions about this privacy agreement, you are welcome to contact us through our contact information. We will reply to your feedback as soon as possible.\n\nThank you again for your support and trust in our application, we will always be committed to protecting your personal privacy.\n\n(Company Name) Hangzhou Fanyue Media Co., Ltd.\n(Contact Information) 100321999@qq.com\n(Date) February 20, 2024''';

String privacyChinese = '''用户协议及隐私政策
一、协议适用范围
本协议适用于您使用我们提供的应用程序及相关服务。请仔细阅读本协议，确保您完全理解并同意其中的条款。
二，用户注册与账号
用户需按照我们提供的注册流程完成注册，确保提供的信息真实、准确、完整。每个用户只能拥有一个账号。
三、服务使用规则
用户在使用我们的服务时，必须遵守相关法律法规及本协议的规定。
四、内容准则与版权
用户发布的内容必须遵守法律法规，不得侵犯他人版权、名誉权等合法权益。我们不对用户发布的内容承担版权责任。
五、知识产权声明
我们提供的应用程序及服务中的所有内容，包括但不限于文字、图片、音频、视频等，均受版权、商标、专利等知识产权法律的保护。
六、用户行为规范
用户应文明使用我们的服务，不得进行任何违反法律法规、侵犯他人权益或干扰服务正常运行的行为。
七、用户权利与义务
用户享有使用我们服务的权利，同时也有遵守本协议、保护账号安全、维护服务秩序的义务。
八、服务中断与终止
在必要时，我们有权中断或终止服务，无需对用户承担任何责任。
九、免责声明与赔偿
我们不对因不可抗力、第三方行为等原因导致的服务中断或数据损失承担责任。用户因违反本协议给我们或第三方造成损失的，应承担相应的赔偿责任。
十、法律适用与争议解决
本协议的签订、执行及解释均适用中华人民共和国法律。如发生争议，应首先通过友好协商解决;协商不成的，任何一方均有权向有管辖权的人民法院提起诉讼。
十一、隐私政策概述
我们非常重视用户的个人隐私，制定了专门的隐私政策。用户在使用我们的服务时，应同时遵守隐私政策的相关规定。十二、信息收集与使用
我们会收集用户在使用服务过程中产生的信息，用于优化服务、提升用户体验。我们会严格遵守相关法律法规及隐私政策的规定，合理使用用户信息。
十三、信息共享与披露
除法律法规规定的情形外，我们不会无故将用户信息共享或披露给第三方。十四、信息安全与保护
我们采取了一系列安全措施来保障用户信息的安全。但用户也应注意保护自己的账号及密码安全，避免信息泄露。
十五、隐私政策更新与修改
随着业务的发展及法律法规的变化，我们可能会适时更新或修改隐私政策。更新或修改后的隐私政策将在应用程序中公布，并在必要时通过其他方式通知用户。
请您务必认真阅读并完全理解本协议及隐私政策的内容，确保您的权益得到充分保障。如果您有任何疑问或建议，请通过我们的联系方式与我们取得联系。我们将竭诚为您服务。


**应用隐私政策**

感谢您选择使用我们的应用程序。我们非常重视您的个人隐私，因此特此制定本隐私协议，以明确我们收集、使用、存储、共享和保护您个人信息的方式。请您在使用我们的应用程序前，仔细阅读并理解本隐私协议。

**1. 引言与定义**

本隐私协议旨在阐述我们如何处理用户的个人信息。在本协议中，“个人信息”指能够直接或间接识别您身份的信息，包括但不限于您的姓名、电话号码、电子邮件地址等。

**2. 信息收集与使用**

在使用我们的应用程序时，我们可能会收集您的个人信息，以便为您提供更好的服务。我们将仅在您明确同意的情况下收集您的个人信息，并仅用于提供和改进我们的服务。

**3. 信息共享与披露**

我们不会无故地将您的个人信息共享或披露给第三方。但在某些情况下，如法律要求或为了维护我们的合法权益，我们可能需要共享或披露您的个人信息。

**4. 信息安全保障**

我们非常重视您的信息安全，已采取一系列安全措施来保护您的个人信息。然而，由于互联网的不安全性，我们不能保证您的个人信息绝对安全。请您妥善保管您的密码和其他登录信息。

**5. 用户权利与选择**

您有权要求我们删除您的个人信息，或在合理范围内更正或补充您的个人信息。同时，您也有权选择是否接受我们的推广信息。

**6. 儿童隐私保护**

我们的应用程序不针对儿童设计。如果您是儿童，请在家长的陪同下使用我们的应用程序，并让家长仔细阅读本隐私协议。

**7. 第三方链接与服务**

我们的应用程序可能包含指向第三方网站或服务的链接。这些第三方网站或服务有自己的隐私政策，我们在此不对其负责。请您在使用前仔细阅读相关隐私政策。

**8. 隐私政策更新与通知**

我们可能会根据需要对本隐私协议进行更新。更新后的隐私协议将在应用程序中公布，并在必要时通过其他方式通知您。

**9. 联系我们与反馈**

如果您对本隐私协议有任何疑问或建议，欢迎通过我们的联系方式与我们取得联系。我们将尽快回复您的反馈。

再次感谢您对我们应用程序的支持与信任，我们将一如既往地致力于保护您的个人隐私。

（公司名称）杭州凡越传媒有限公司
（联系方式）100321999@qq.com
（日期）2024年2月20日''';
